package com.xueyi.operations.domain.po;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import com.xueyi.operations.domain.dto.OpFaultProcessDto;
import com.xueyi.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xueyi.operations.domain.enums.FaultProcessEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableField;
import static com.baomidou.mybatisplus.annotation.SqlCondition.*;

import java.io.Serial;

import static com.xueyi.common.core.constant.basic.EntityConstants.SORT;
import static com.xueyi.common.core.constant.basic.EntityConstants.REMARK;
import static com.xueyi.common.core.constant.basic.EntityConstants.NAME;

/**
 * 故障处理 持久化对象
 *
 * @author lwb
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "故障处理 持久化对象")
@TableName(value = "op_fault_process", excludeProperty = { SORT, REMARK, NAME })
public class OpFaultProcessPo extends TBaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 标题 */
    @Schema(name = "标题")
    @Excel(name = "标题")
    @TableField(condition = LIKE)
    protected String title;

    /** 流程类型 */
    @Schema(name = "流程类型")
    @Excel(name = "流程类型")
    protected Long processType;

    /** 优先级 */
    @Schema(name = "优先级")
    @Excel(name = "优先级")
    protected String priority;

    /** 申报人 */
    @Schema(name = "申报人")
    @Excel(name = "申报人")
    @TableField(condition = LIKE)
    protected String reporterName;

    /** 申报人部门 */
    @Schema(name = "申报人部门")
    @Excel(name = "申报人部门")
    protected String reporterDepartment;

    /** 申报人电话 */
    @Schema(name = "申报人电话")
    @Excel(name = "申报人电话")
    @TableField(condition = LIKE)
    protected String reporterPhone;

    /** 申报人邮箱 */
    @Schema(name = "申报人邮箱")
    @Excel(name = "申报人邮箱")
    protected String reporterEmail;

    /** 描述 */
    @Schema(name = "描述")
    @Excel(name = "描述")
    protected String description;

    /** 申报时间 */
    @Schema(name = "申报时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "申报时间")
    protected Date reportingTime;

    /** 工单状态 */
    @Schema(name = "工单状态")
    @Excel(name = "工单状态", type = Excel.Type.EXPORT)
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    protected FaultProcessEnum faultProcessStatus;

    /** 状态 */
    @Schema(name = "状态")
    protected String status;

    /** 当前指派人员ID */
    @Schema(name = "当前指派人员ID")
    @Excel(name = "当前指派人员ID")
    protected Long assignUserId;

    /** 版本号 */
    @Schema(name = "版本号")
    protected Integer version;

}
